package xiaoming;

import java.util.Scanner;

public class java_chapter5_shangji_4 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("**********************************************");
		System.out.println("welcome to use my shopping management system");
		System.out.println("\t1.information management");
		System.out.println("\t2.购物结算");
		System.out.println("\t3.真情回馈");
		System.out.println("\t4.logout");
		System.out.println("**********************************************");
		boolean isRight = true;
		System.out.print("请选择，输入数字：");
		do {
			isRight = true;
			
			int response = in.nextInt();
			switch (response) {
			case 1:
				System.out.println("information management function");
				break;
			case 2:
				System.out.println("执行购物结算功能");
				break;
			case 3:
				System.out.println("真情回馈区");
				break;
			case 4:
				System.out.println("logout");
				break;
			default:
				isRight = false;
				System.out.print("输入错误，请重新输入：");
			}
		} while (!isRight);
		System.out.println("\nprogram end");

	}

}
